<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>D:\workspace-sts-3.8.1.RELEASE\easyee-ssh\github\doc\SSH\.EasyEE-ssh-readme-en.md.html</title>


<style type="text/css">
body {
	color: #333;
	font: 13px/1.4 "Helvetica Neue", Helvetica, "Segoe UI", Arial, freesans, sans-serif;
	padding: 0;
	margin: 0;
}

a {
	background: transparent;
	color: #4183c4;
	text-decoration: none;
}

a:active,
a:hover {
	outline: 0 none;
	text-decoration: underline;
}

abbr[title] {
	border-bottom: 1px dotted;
}

b,
strong {
	font-weight: bold;
}

dfn {
	font-style: italic;
}
h1 {
	font-size: 2em;
	margin: 0.67em 0;
}
mark {
	background: #ff0;
	color: #000;
}
small {
	font-size: 80%;
}
sub, sup {
	font-size: 75%;
	line-height: 0;
	position: relative;
	vertical-align: baseline;
}
sup {
	top: -0.5em;
}
sub {
	bottom: -0.25em;
}
img {
	border: 0 none;
}
svg:not(:root) {
	overflow: hidden;
}
figure {
	margin: 1em 40px;
}
hr {
	box-sizing: content-box;
	height: 0;
}

code,
kbd,
pre,
samp {
	font-family: monospace,monospace;
	font-size: 1em;
}

pre {
	overflow: auto;
	font: 12px Consolas,"Liberation Mono",Menlo,Courier,monospace;
	margin-bottom: 0;
	margin-top: 0;
}

.markdown-body {
	padding: 30px;
	font-size: 16px;
	line-height: 1.6;
	word-wrap: break-word;
}

.markdown-body>*:first-child {
	margin-top: 0 !important;
}

.markdown-body>*:last-child {
	margin-bottom: 0 !important;
}

.markdown-body .absent {
	color: #c00;
}

.markdown-body .anchor {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	display: block;
	padding-right: 6px;
	padding-left: 30px;
	margin-left: -30px;
}

.markdown-body .anchor:focus {
	outline: none;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
	position: relative;
	margin-top: 1em;
	margin-bottom: 16px;
	font-weight: bold;
	line-height: 1.4;
}

.markdown-body h1 .octicon-link,
.markdown-body h2 .octicon-link,
.markdown-body h3 .octicon-link,
.markdown-body h4 .octicon-link,
.markdown-body h5 .octicon-link,
.markdown-body h6 .octicon-link {
	display: none;
	color: #000;
	vertical-align: middle;
}

.markdown-body h1:hover .anchor,
.markdown-body h2:hover .anchor,
.markdown-body h3:hover .anchor,
.markdown-body h4:hover .anchor,
.markdown-body h5:hover .anchor,
.markdown-body h6:hover .anchor {
	padding-left: 8px;
	margin-left: -30px;
	line-height: 1;
	text-decoration: none;
}

.markdown-body h1:hover .anchor .octicon-link,
.markdown-body h2:hover .anchor .octicon-link,
.markdown-body h3:hover .anchor .octicon-link,
.markdown-body h4:hover .anchor .octicon-link,
.markdown-body h5:hover .anchor .octicon-link,
.markdown-body h6:hover .anchor .octicon-link {
	display: inline-block;
}

.markdown-body h1 tt,
.markdown-body h1 code,
.markdown-body h2 tt,
.markdown-body h2 code,
.markdown-body h3 tt,
.markdown-body h3 code,
.markdown-body h4 tt,
.markdown-body h4 code,
.markdown-body h5 tt,
.markdown-body h5 code,
.markdown-body h6 tt,
.markdown-body h6 code {
	font-size: inherit;
}

.markdown-body h1 {
	padding-bottom: 0.3em;
	font-size: 2.25em;
	line-height: 1.2;
	border-bottom: 1px solid #eee;
}

.markdown-body h2 {
	padding-bottom: 0.3em;
	font-size: 1.75em;
	line-height: 1.225;
	border-bottom: 1px solid #eee;
}

.markdown-body h3 {
	font-size: 1.5em;
	line-height: 1.43;
}

.markdown-body h4 {
	font-size: 1.25em;
}

.markdown-body h5 {
	font-size: 1em;
}

.markdown-body h6 {
	font-size: 1em;
	color: #777;
}

.markdown-body p,.markdown-body blockquote,
.markdown-body ul,.markdown-body ol,
.markdown-body dl,.markdown-body table,
.markdown-body pre {
	margin-top: 0;
	margin-bottom: 16px;
}

.markdown-body hr {
	height: 4px;
	padding: 0;
	margin: 16px 0;
	background-color: #e7e7e7;
	border: 0 none;
}

.markdown-body ul,
.markdown-body ol {
	padding-left: 2em;
}

.markdown-body ul.no-list,
.markdown-body ol.no-list {
	padding: 0;
	list-style-type: none;
}

.markdown-body ul ul,
.markdown-body ul ol,
.markdown-body ol ol,
.markdown-body ol ul {
	margin-top: 0;
	margin-bottom: 0;
}

.markdown-body li>p {
	margin-top: 16px;
}

.markdown-body dl {
	padding: 0;
}

.markdown-body dl dt {
	padding: 0;
	margin-top: 16px;
	font-size: 1em;
	font-style: italic;
	font-weight: bold;
}

.markdown-body dl dd {
	padding: 0 16px;
	margin-bottom: 16px;
}

.markdown-body blockquote {
	padding: 0 15px;
	color: #777;
	border-left: 4px solid #ddd;
}

.markdown-body blockquote>:first-child {
	margin-top: 0;
}

.markdown-body blockquote>:last-child {
	margin-bottom: 0;
}

.markdown-body table {
	display: block;
	width: 100%;
	overflow: auto;
	word-break: normal;
	word-break: keep-all;
}

.markdown-body table th {
	font-weight: bold;
}

.markdown-body table th,
.markdown-body table td {
	padding: 6px 13px;
	border: 1px solid #ddd;
}

.markdown-body table tr {
	background-color: #fff;
	border-top: 1px solid #ccc;
}

.markdown-body table tr:nth-child(2n) {
	background-color: #f8f8f8;
}

.markdown-body img {
	max-width: 100%;
	-moz-box-sizing: border-box;
	box-sizing: border-box;
}

.markdown-body span.frame {
	display: block;
	overflow: hidden;
}

.markdown-body span.frame>span {
	display: block;
	float: left;
	width: auto;
	padding: 7px;
	margin: 13px 0 0;
	overflow: hidden;
	border: 1px solid #ddd;
}

.markdown-body span.frame span img {
	display: block;
	float: left;
}

.markdown-body span.frame span span {
	display: block;
	padding: 5px 0 0;
	clear: both;
	color: #333;
}

.markdown-body span.align-center {
	display: block;
	overflow: hidden;
	clear: both;
}

.markdown-body span.align-center>span {
	display: block;
	margin: 13px auto 0;
	overflow: hidden;
	text-align: center;
}

.markdown-body span.align-center span img {
	margin: 0 auto;
	text-align: center;
}

.markdown-body span.align-right {
	display: block;
	overflow: hidden;
	clear: both;
}

.markdown-body span.align-right>span {
	display: block;
	margin: 13px 0 0;
	overflow: hidden;
	text-align: right;
}

.markdown-body span.align-right span img {
	margin: 0;
	text-align: right;
}

.markdown-body span.float-left {
	display: block;
	float: left;
	margin-right: 13px;
	overflow: hidden;
}

.markdown-body span.float-left span {
	margin: 13px 0 0;
}

.markdown-body span.float-right {
	display: block;
	float: right;
	margin-left: 13px;
	overflow: hidden;
}

.markdown-body span.float-right>span {
	display: block;
	margin: 13px auto 0;
	overflow: hidden;
	text-align: right;
}

.markdown-body code,.markdown-body tt {
	padding: 0;
	padding-top: 0.2em;
	padding-bottom: 0.2em;
	margin: 0;
	font-size: 85%;
	background-color: rgba(0,0,0,0.04);
	border-radius: 3px;
}

.markdown-body code:before,
.markdown-body code:after,
.markdown-body tt:before,
.markdown-body tt:after {
	letter-spacing: -0.2em;
	content: "\00a0";
}

.markdown-body code br,
.markdown-body tt br {
	display: none;
}

.markdown-body del code {
	text-decoration: inherit;
}

.markdown-body pre>code {
	padding: 0;
	margin: 0;
	font-size: 100%;
	word-break: normal;
	white-space: pre;
	background: transparent;
	border: 0;
}

.markdown-body .highlight {
	margin-bottom: 16px;
}

.markdown-body .highlight pre,
.markdown-body pre {
	padding: 16px;
	overflow: auto;
	font-size: 85%;
	line-height: 1.45;
	background-color: #f7f7f7;
	border-radius: 3px;
}

.markdown-body .highlight pre {
	margin-bottom: 0;
	word-break: normal;
}

.markdown-body pre {
	word-wrap: normal;
}

.markdown-body pre code,
.markdown-body pre tt {
	display: inline;
	max-width: initial;
	padding: 0;
	margin: 0;
	overflow: initial;
	line-height: inherit;
	word-wrap: normal;
	background-color: transparent;
	border: 0;
}

.markdown-body pre code:before,
.markdown-body pre code:after,
.markdown-body pre tt:before,
.markdown-body pre tt:after {
	content: normal;
}

.highlight .pl-coc,
.highlight .pl-entl,
.highlight .pl-entm,
.highlight .pl-eoa,
.highlight .pl-mai .pl-sf,
.highlight .pl-mm,
.highlight .pl-pdv,
.highlight .pl-sc,
.highlight .pl-som,
.highlight .pl-sr,
.highlight .pl-v,
.highlight .pl-vpf {
	color: #0086b3;
}
.highlight .pl-eoac,
.highlight .pl-mdht,
.highlight .pl-mi1,
.highlight .pl-mri,
.highlight .pl-va,
.highlight .pl-vpu {
	color: #008080;
}
.highlight .pl-c,
.highlight .pl-pdc {
	color: #b4b7b4;
	font-style: italic;
}
.highlight .pl-k,
.highlight .pl-ko,
.highlight .pl-kolp,
.highlight .pl-mc,
.highlight .pl-mr,
.highlight .pl-ms,
.highlight .pl-s,
.highlight .pl-sok,
.highlight .pl-st {
	color: #6e5494;
}
.highlight .pl-ef,
.highlight .pl-enf,
.highlight .pl-enm,
.highlight .pl-entc,
.highlight .pl-eoi,
.highlight .pl-sf,
.highlight .pl-smc {
	color: #d12089;
}
.highlight .pl-ens,
.highlight .pl-eoai,
.highlight .pl-kos,
.highlight .pl-mh .pl-pdh,
.highlight .pl-mp,
.highlight .pl-pde,
.highlight .pl-stp {
	color: #458;
}
.highlight .pl-enti {
	color: #d12089;
	font-weight: bold;
}
.highlight .pl-cce,
.highlight .pl-enc,
.highlight .pl-kou,
.highlight .pl-mq {
	color: #f93;
}
.highlight .pl-mp1 .pl-sf {
	color: #458;
	font-weight: bold;
}
.highlight .pl-cos,
.highlight .pl-ent,
.highlight .pl-md,
.highlight .pl-mdhf,
.highlight .pl-ml,
.highlight .pl-pdc1,
.highlight .pl-pds,
.highlight .pl-s1,
.highlight .pl-scp,
.highlight .pl-sol {
	color: #df5000;
}
.highlight .pl-c1,
.highlight .pl-cn,
.highlight .pl-pse,
.highlight .pl-pse .pl-s2,
.highlight .pl-vi {
	color: #a31515;
}
.highlight .pl-mb,
.highlight .pl-pdb {
	color: #df5000;
	font-weight: bold;
}
.highlight .pl-mi,
.highlight .pl-pdi {
	color: #6e5494;
	font-style: italic;
}
.highlight .pl-ms1 {
	background-color: #f5f5f5;
}
.highlight .pl-mdh,
.highlight .pl-mdi {
	font-weight: bold;
}
.highlight .pl-mdr {
	color: #0086b3;
	font-weight: bold;
}
.highlight .pl-s2 {
	color: #333;
}
.highlight .pl-ii {
	background-color: #df5000;
	color: #fff;
}
.highlight .pl-ib {
	background-color: #f93;
}
.highlight .pl-id {
	background-color: #a31515;
	color: #fff;
}
.highlight .pl-iu {
	background-color: #b4b7b4;
}
.highlight .pl-mo {
	color: #969896;
}

</style>


<script type="text/javascript">

function getDocumentScrollTop() 
{
   var res = document.body.scrollTop || document.documentElement.scrollTop || window.pageYOffset || 0;
   // alert(res);
   return res;
}

function setDocumentScrollTop(ypos) 
{
	window.scrollTo(0, ypos);
}

</script>


</head>
<body class="markdown-body"><a href="easyee-ssh-readme-single_zh_CN.html">中文</a> | <a href="easyee-ssh-readme-single_en.html">英文</a>
<h1> <a id="easyee-sshjpa-architecture-manual" class="anchor" href="#easyee-sshjpa-architecture-manual" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>EasyEE-SSH(JPA) Architecture Manual</h1> 
<p>EasyEE is a JaveEE background development framework.</p> 
<p>Based on the widely used JaveEE framework and EasyUI front-end framework, it provides the rights management system, security management framework and common development components based on user, role and authority scheme. For the enterprise background project development provides the infrastructure and norms.</p> 
<p>Latest version: <code>4.2.0</code></p> 
<h2> <a id="ssh-framework" class="anchor" href="#ssh-framework" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>SSH Framework</h2> 
<ul> 
 <li><strong>Struts 2.5+</strong></li> 
 <li><strong>Hibernate 5+(JPA)</strong></li> 
 <li><strong>Spring 4+</strong></li> 
 <li><strong>Shiro 2+</strong></li> 
 <li>EasyCommonDAO</li> 
 <li>EasyShiro </li> 
 <li>EasyFilter</li> 
 <li>EasyUI 1.4.3</li> 
 <li>EasyUIEx 2.2.0</li> 
</ul> 
<h2> <a id="maven-framework-version" class="anchor" href="#maven-framework-version" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Maven framework version</h2> 
<div class="highlight highlight-text-xml">
 <pre>&lt;<span class="pl-ent">struts</span>.version&gt;2.5.5&lt;/<span class="pl-ent">struts</span>.version&gt;
&lt;<span class="pl-ent">hibernate</span>.version&gt;5.2.4.Final&lt;/<span class="pl-ent">hibernate</span>.version&gt;
&lt;<span class="pl-ent">spring</span>.version&gt;4.3.4.RELEASE&lt;/<span class="pl-ent">spring</span>.version&gt;

&lt;<span class="pl-ent">druid</span>.version&gt;1.0.26&lt;/<span class="pl-ent">druid</span>.version&gt;
&lt;<span class="pl-ent">gson</span>.version&gt;2.8.0&lt;/<span class="pl-ent">gson</span>.version&gt;
&lt;<span class="pl-ent">slf4j</span>.version&gt;1.7.21&lt;/<span class="pl-ent">slf4j</span>.version&gt;
&lt;<span class="pl-ent">log4j2</span>.version&gt;2.7&lt;/<span class="pl-ent">log4j2</span>.version&gt;
&lt;<span class="pl-ent">mysql</span>.version&gt;5.1.34&lt;/<span class="pl-ent">mysql</span>.version&gt;
&lt;<span class="pl-ent">shiro</span>.version&gt;1.2.5&lt;/<span class="pl-ent">shiro</span>.version&gt;
&lt;<span class="pl-ent">easyshiro</span>.version&gt;2.4.0-RELEASE&lt;/<span class="pl-ent">easyshiro</span>.version&gt;
&lt;<span class="pl-ent">easyfilte</span>.version&gt;2.0.1-RELEASE&lt;/<span class="pl-ent">easyfilte</span>.version&gt;</pre>
</div> 
<ul> 
 <li> <p><strong>Struts2.5 Notice:</strong> Struts provides enhanced security access model<code>Strict Method Invocation (Strict DMI, SMI)</code> after 2.5 , if you want to call a method by wildcards or DMI must be configured to allow in <code>struts_default.xml</code> method name:</p> 
  <div class="highlight highlight-text-xml">
   <pre><span class="pl-c">&lt;!-- Allowed Methods for Strict DMI --&gt;</span>
&lt;<span class="pl-ent">global-allowed-methods</span>&gt;execute,input,back,cancel,browse,save,delete,list,index,move,update,getAllPermissionsId,changePwd,regex:(list.*),regex:(all.*)&lt;/<span class="pl-ent">global-allowed-methods</span>&gt;</pre>
  </div> </li> 
</ul> 
<h2> <a id="framework-manual" class="anchor" href="#framework-manual" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Framework Manual</h2> 
<ol> 
 <li><p>Project structure </p></li> 
 <li><p>Quick Development Manual </p></li> 
 <li><p>Other configuration instructions</p></li> 
</ol> 
<h2> <a id="project-structure" class="anchor" href="#project-structure" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Project structure</h2> 
<div class="highlight highlight-source-js">
 <pre>EasySSH 
    <span class="pl-k">+</span> src<span class="pl-k">/</span>main<span class="pl-k">/</span>java 
        <span class="pl-k">+</span> <span class="pl-smi">cn</span>.<span class="pl-smi">easyproject</span>.<span class="pl-smi">easyssh</span> 
            <span class="pl-k">+</span> <span class="pl-en">base</span> (Base Common Package)
                <span class="pl-k">+</span> action 
                    <span class="pl-k">+</span> <span class="pl-smi">BaseAction</span>.<span class="pl-en">java</span>(All Action <span class="pl-k">extends</span> BaseAction)
                <span class="pl-k">+</span> dao
                    <span class="pl-k">+</span> <span class="pl-smi">CommonDAO</span>.<span class="pl-smi">java</span> 
                    <span class="pl-k">+</span> impl
                        <span class="pl-k">+</span> <span class="pl-smi">CommonDAOSprintImpl</span>.<span class="pl-smi">java</span> 
                <span class="pl-k">+</span> service
                    <span class="pl-k">+</span> <span class="pl-smi">BaseService</span>.<span class="pl-en">java</span> (All Service <span class="pl-k">extends</span> BaseService)
                <span class="pl-k">+</span> util 
                    <span class="pl-k">+</span> <span class="pl-k">...</span> (PageBean, EasyCriteria, Encryption, Utils<span class="pl-k">...</span>.)
            <span class="pl-k">+</span> <span class="pl-en">sys</span> (<span class="pl-c1">RBAC</span> Package)
                <span class="pl-k">+</span> action, entity, service, util, shiro, criteria<span class="pl-k">...</span> 
            <span class="pl-k">+</span> <span class="pl-en">moudle</span>  (Demo Package)
                <span class="pl-k">+</span> action, entity, service, criteria<span class="pl-k">...</span>
    <span class="pl-k">+</span> src<span class="pl-k">/</span>main<span class="pl-k">/</span>resource
        <span class="pl-k">+</span> i18n
            <span class="pl-k">+</span> <span class="pl-smi">ApplicationResources</span>.<span class="pl-en">properties</span> (i18n)
            <span class="pl-k">+</span> <span class="pl-smi">ApplicationResources_zh_CN</span>.<span class="pl-en">properties</span> (i18n)
        <span class="pl-k">+</span> spring
            <span class="pl-k">+</span> <span class="pl-smi">ApplicationContext_bean</span>.<span class="pl-en">xml</span> (Spring Bean scanner)
            <span class="pl-k">+</span> <span class="pl-smi">ApplicationContext_dao</span>.<span class="pl-en">xml</span> (Spring <span class="pl-c1">DAO</span>)
            <span class="pl-k">+</span> <span class="pl-smi">ApplicationContext_shiro</span>.<span class="pl-en">xml</span> (Spring Shiro)
            <span class="pl-k">+</span> <span class="pl-smi">ApplicationContext</span>.<span class="pl-en">xml</span> (Spring Core configuration)
        <span class="pl-k">+</span> struts 
            <span class="pl-k">+</span> <span class="pl-smi">struts_default</span>.<span class="pl-en">xml</span> (Struts2 default parent <span class="pl-k">package</span>)
            <span class="pl-k">+</span> <span class="pl-smi">struts_dispatcher</span>.<span class="pl-en">xml</span> (Struts2 dispatcher)
            <span class="pl-k">+</span> <span class="pl-smi">struts_sys</span>.<span class="pl-en">xml</span> (<span class="pl-c1">RBAC</span>)
        <span class="pl-k">+</span> <span class="pl-smi">db</span>.<span class="pl-en">properties</span> (jdbc info) 
        <span class="pl-k">+</span> <span class="pl-smi">easyFilter</span>.<span class="pl-en">properties</span> (EasyFilter Web request filter)
        <span class="pl-k">+</span> <span class="pl-smi">ehcache</span>.<span class="pl-en">xml</span> (ehcache )
        <span class="pl-k">+</span> <span class="pl-smi">log4j</span>.<span class="pl-en">properties</span> (Log4J)
        <span class="pl-k">+</span> <span class="pl-smi">log4j2</span>.<span class="pl-en">xml</span> (Log4J2)
        <span class="pl-k">+</span> <span class="pl-smi">struts</span>.<span class="pl-en">xml</span> (Struts2 include)
        <span class="pl-k">+</span> <span class="pl-smi">struts</span>.<span class="pl-en">properties</span> (Struts2 properties)
    <span class="pl-k">+</span> src<span class="pl-k">/</span>test<span class="pl-k">/</span>java 
    <span class="pl-k">+</span> src<span class="pl-k">/</span>test<span class="pl-k">/</span>resource 
    <span class="pl-k">+</span> WebRoot
        <span class="pl-k">+</span> doc
        <span class="pl-k">+</span> jsp 
            <span class="pl-k">+</span> <span class="pl-en">echarts</span> (ECharts demo)
            <span class="pl-k">+</span> error 
                <span class="pl-k">+</span> <span class="pl-smi">notFound</span>.<span class="pl-en">jsp</span> (<span class="pl-c1">404</span> error)
                <span class="pl-k">+</span> <span class="pl-smi">permissionDenied</span>.<span class="pl-en">jsp</span> (no permission)
                <span class="pl-k">+</span> <span class="pl-smi">serverError</span>.<span class="pl-en">jsp</span> (<span class="pl-c1">500</span> error)
            <span class="pl-k">+</span> <span class="pl-smi">VerifyCode</span>.<span class="pl-smi">jsp</span> （<span class="pl-c1">CAPTCHA</span> <span class="pl-c1">JSP</span>）
        <span class="pl-k">+</span> locklogin
            <span class="pl-k">+</span> <span class="pl-smi">admin</span>.<span class="pl-en">jsp</span> (EasyShiro LockLogin Management)
        <span class="pl-k">+</span> <span class="pl-en">script</span> (project <span class="pl-c1">module</span> js, <span class="pl-k">with</span> <span class="pl-c1">WEB</span><span class="pl-k">-</span><span class="pl-c1">INF</span><span class="pl-k">/</span>content)
            <span class="pl-k">+</span> main
                <span class="pl-k">+</span> <span class="pl-en">sys</span> (<span class="pl-c1">RBAC</span>)
                <span class="pl-k">+</span> <span class="pl-smi">main</span>.<span class="pl-en">js</span> (<span class="pl-smi">main</span>.<span class="pl-smi">jsp</span>)
            <span class="pl-k">+</span> <span class="pl-smi">login</span>.<span class="pl-en">js</span> (<span class="pl-smi">login</span>.<span class="pl-smi">jsp</span>) 
        <span class="pl-k">+</span> staticresources
            <span class="pl-k">+</span> easyee 
                <span class="pl-k">+</span> <span class="pl-en">json</span> (easyssh json<span class="pl-k">:</span> theme, icon)
                <span class="pl-k">+</span> easyee<span class="pl-k">-</span><span class="pl-smi">ssh</span>.<span class="pl-smi">main</span>.<span class="pl-en">js</span> (easyssh core js)
                <span class="pl-k">+</span> <span class="pl-smi">jquery</span>.<span class="pl-c1">cookie</span>.<span class="pl-smi">js</span> 
            <span class="pl-k">+</span> <span class="pl-en">easyui</span> (EasyUI )
            <span class="pl-k">+</span> <span class="pl-en">easyuiex</span> (EasyUIEx)
            <span class="pl-k">+</span> <span class="pl-en">echarts</span> (EChars)
            <span class="pl-k">+</span> <span class="pl-en">error</span> (<span class="pl-c1">JSP</span> <span class="pl-c1">Error</span> Page)
            <span class="pl-k">+</span> images
            <span class="pl-k">+</span> style 
                <span class="pl-k">+</span> <span class="pl-smi">easyee</span>.<span class="pl-smi">main</span>.<span class="pl-en">css</span> (easyssh golbal css)
        <span class="pl-k">+</span> <span class="pl-c1">WEB</span><span class="pl-k">-</span><span class="pl-c1">INF</span>
            <span class="pl-k">+</span> <span class="pl-en">content</span> (project page)
                <span class="pl-k">+</span> <span class="pl-en">dialog</span> (EasyUI Dialog)
                    <span class="pl-k">+</span> <span class="pl-en">sys</span> (<span class="pl-c1">RBAC</span>)
                    <span class="pl-k">+</span> <span class="pl-en">hr</span> (Demo <span class="pl-c1">module</span>)
                <span class="pl-k">+</span> <span class="pl-en">main</span> (EasyUI Core page)
                    <span class="pl-k">+</span> <span class="pl-en">sys</span> (<span class="pl-c1">RBAC</span> page)
                    <span class="pl-k">+</span> <span class="pl-en">hr</span> (Demo Page)
                    <span class="pl-k">+</span> <span class="pl-smi">main</span>.<span class="pl-en">jsp</span> (EasySSH Main Page)
                <span class="pl-k">+</span> <span class="pl-smi">login</span>.<span class="pl-smi">jsp</span> 
            <span class="pl-k">+</span> lib 
            <span class="pl-k">+</span> <span class="pl-smi">web</span>.<span class="pl-smi">xml</span></pre>
</div> 
<h2> <a id="quick-development-manual" class="anchor" href="#quick-development-manual" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Quick Development Manual</h2> 
<ol> 
 <li> <p><strong>Create new moudle package</strong></p> <p>cn.easyproject.easyssh.<code>yourmodule</code> cn.easyproject.easyssh.yourmodule.<code>entity</code> cn.easyproject.easyssh.yourmodule.<code>service</code> cn.easyproject.easyssh.yourmodule.<code>action</code> cn.easyproject.easyssh.yourmodule.<code>criteria</code></p> </li> 
 <li> <p><strong>Create POJO in entity package(Annotaion or XML)</strong></p> 
  <div class="highlight highlight-source-java">
   <pre><span class="pl-k">@Entity</span>
<span class="pl-k">@Table</span>(<span class="pl-c1">name</span> <span class="pl-k">=</span> <span class="pl-s"><span class="pl-pds">&quot;</span>Dept<span class="pl-pds">&quot;</span></span>)
<span class="pl-k">public</span> <span class="pl-k">class</span> <span class="pl-en">Dept</span> <span class="pl-k">implements</span> <span class="pl-e">java.io<span class="pl-k">.</span>Serializable</span> {
      <span class="pl-c">//...</span>
}</pre>
  </div> </li> 
 <li> <p><strong>Create Service in service package</strong></p> 
  <ul> 
   <li> <p>Interface, Use <code>@Transactional</code> to declare transaction</p> 
    <div class="highlight highlight-source-java">
     <pre><span class="pl-k">@Transactional</span>
<span class="pl-k">public</span> <span class="pl-k">interface</span> <span class="pl-en">DeptService</span> {
    <span class="pl-k">public</span> <span class="pl-k">void</span> <span class="pl-en">save</span>(<span class="pl-smi">Dept</span> <span class="pl-v">dept</span>);

    <span class="pl-k">public</span> <span class="pl-k">void</span> <span class="pl-en">delete</span>(<span class="pl-smi">Serializable</span> <span class="pl-v">deptno</span>);

    <span class="pl-k">public</span> <span class="pl-k">void</span> <span class="pl-en">update</span>(<span class="pl-smi">Dept</span> <span class="pl-v">dept</span>);

    <span class="pl-k">@Transactional</span>(<span class="pl-c1">readOnly</span><span class="pl-k">=</span><span class="pl-c1">true</span>)
    <span class="pl-k">public</span> <span class="pl-smi">Dept</span> <span class="pl-en">get</span>(<span class="pl-smi">Integer</span> <span class="pl-v">deptno</span>);

    <span class="pl-k">@SuppressWarnings</span>(<span class="pl-s"><span class="pl-pds">&quot;</span>rawtypes<span class="pl-pds">&quot;</span></span>)
    <span class="pl-k">@Transactional</span>(<span class="pl-c1">readOnly</span><span class="pl-k">=</span><span class="pl-c1">true</span>)
    <span class="pl-k">public</span> <span class="pl-k">void</span> <span class="pl-en">findByPage</span>(<span class="pl-smi">PageBean</span> <span class="pl-v">pageBean</span>, <span class="pl-smi">DeptCriteria</span> <span class="pl-v">deptCriteria</span>);

    <span class="pl-k">@Transactional</span>(<span class="pl-c1">readOnly</span><span class="pl-k">=</span><span class="pl-c1">true</span>)
    <span class="pl-k">public</span> <span class="pl-k">int</span> <span class="pl-en">findMaxPage</span>(<span class="pl-k">int</span> <span class="pl-v">rowPerPage</span>);

    <span class="pl-k">@Transactional</span>(<span class="pl-c1">readOnly</span><span class="pl-k">=</span><span class="pl-c1">true</span>)
    <span class="pl-k">public</span> <span class="pl-k">List&lt;<span class="pl-smi">Dept</span>&gt;</span> <span class="pl-en">findAll</span>();
}</pre>
    </div> </li> 
   <li> <p>Implements in <code>service.impl</code></p> 
    <ul> 
     <li><p>extends BaseService</p></li> 
     <li><p>direct invoke commonDAO method</p></li> 
     <li><p>use @Service</p></li> 
    </ul> 
    <div class="highlight highlight-source-java">
     <pre>   <span class="pl-c">/**</span>
<span class="pl-c">    * extends BaseService</span>
<span class="pl-c">    * direct invoke commonDAO method</span>
<span class="pl-c">    *  </span>
<span class="pl-c">    * @author easyproject.cn</span>
<span class="pl-c">    * @version 1.0</span>
<span class="pl-c">    *</span>
<span class="pl-c">    */</span>
   <span class="pl-k">@Service</span>(<span class="pl-s"><span class="pl-pds">&quot;</span>deptService<span class="pl-pds">&quot;</span></span>)
    <span class="pl-k">public</span> <span class="pl-k">class</span> <span class="pl-en">DeptServiceImpl</span> <span class="pl-k">extends</span> <span class="pl-e">BaseService</span> <span class="pl-k">implements</span> <span class="pl-e">DeptService</span> {

        <span class="pl-k">@Override</span>
        <span class="pl-k">public</span> <span class="pl-k">void</span> <span class="pl-en">save</span>(<span class="pl-smi">Dept</span> <span class="pl-v">dept</span>) {
            commonDAO<span class="pl-k">.</span>persist(dept);
        }

        <span class="pl-k">@Override</span>
        <span class="pl-k">public</span> <span class="pl-k">void</span> <span class="pl-en">delete</span>(<span class="pl-smi">Serializable</span> <span class="pl-v">deptno</span>) {
            commonDAO<span class="pl-k">.</span>updateByJpql(<span class="pl-s"><span class="pl-pds">&quot;</span>delete from Dept where deptno=?<span class="pl-pds">&quot;</span></span>,deptno);
        }

        <span class="pl-k">@Override</span>
        <span class="pl-k">public</span> <span class="pl-k">void</span> <span class="pl-en">update</span>(<span class="pl-smi">Dept</span> <span class="pl-v">dept</span>) {
            commonDAO<span class="pl-k">.</span>merge(dept);
        }

        <span class="pl-k">@Override</span>
        <span class="pl-k">public</span> <span class="pl-smi">Dept</span> <span class="pl-en">get</span>(<span class="pl-smi">Integer</span> <span class="pl-v">deptno</span>) {
            <span class="pl-k">return</span> commonDAO<span class="pl-k">.</span>find(<span class="pl-smi">Dept</span><span class="pl-k">.</span>class, deptno);
        }

        <span class="pl-k">@SuppressWarnings</span>(<span class="pl-s"><span class="pl-pds">&quot;</span>rawtypes<span class="pl-pds">&quot;</span></span>)
        <span class="pl-k">@Override</span>
        <span class="pl-k">public</span> <span class="pl-k">void</span> <span class="pl-en">findByPage</span>(<span class="pl-smi">PageBean</span> <span class="pl-v">pageBean</span>, <span class="pl-smi">DeptCriteria</span> <span class="pl-v">deptCriteria</span>) {
            pageBean<span class="pl-k">.</span>setEntityName(<span class="pl-s"><span class="pl-pds">&quot;</span>Dept dept<span class="pl-pds">&quot;</span></span>);
            pageBean<span class="pl-k">.</span>setSelect(<span class="pl-s"><span class="pl-pds">&quot;</span>select dept<span class="pl-pds">&quot;</span></span>);

            <span class="pl-c">// 按条件分页查询</span>
            commonDAO<span class="pl-k">.</span>findByPage(pageBean,deptCriteria);
        }

        <span class="pl-k">@Override</span>
        <span class="pl-k">public</span> <span class="pl-k">int</span> <span class="pl-en">findMaxPage</span>(<span class="pl-k">int</span> <span class="pl-v">rowPerPage</span>) {
            <span class="pl-k">return</span> commonDAO<span class="pl-k">.</span>findMaxPage(<span class="pl-s"><span class="pl-pds">&quot;</span>select count(*) from Dept<span class="pl-pds">&quot;</span></span>, rowPerPage);
        }

        <span class="pl-k">@SuppressWarnings</span>(<span class="pl-s"><span class="pl-pds">&quot;</span>unchecked<span class="pl-pds">&quot;</span></span>)
        <span class="pl-k">@Override</span>
        <span class="pl-k">public</span> <span class="pl-k">List&lt;<span class="pl-smi">Dept</span>&gt;</span> <span class="pl-en">findAll</span>() {
            <span class="pl-k">return</span> commonDAO<span class="pl-k">.</span>find(<span class="pl-s"><span class="pl-pds">&quot;</span>from Dept<span class="pl-pds">&quot;</span></span>);
        }

    }</pre>
    </div> </li> 
  </ul> </li> 
 <li> <p><strong>Create Action Controller</strong></p> 
  <div class="highlight highlight-source-java">
   <pre> <span class="pl-c">/**</span>
<span class="pl-c">  * Must extends BaseAction</span>
<span class="pl-c">  * </span>
<span class="pl-c">  * BaseAction includes:</span>
<span class="pl-c">  * - request, application Servlet API</span>
<span class="pl-c">  * - JSON parameters</span>
<span class="pl-c">  * - Init JSON data method（setJsonMap，setJsonMsgMap，setJsonPaginationMap(PageBean, Object...)）</span>
<span class="pl-c">  * - EasyUI Pagination parameter</span>
<span class="pl-c">  * - JSON constant: result=&quot;json&quot; </span>
<span class="pl-c">  *</span>
<span class="pl-c">  */</span>
<span class="pl-k">@ParentPackage</span>(<span class="pl-s"><span class="pl-pds">&quot;</span>easyssh-default<span class="pl-pds">&quot;</span></span>)
<span class="pl-k">@Namespace</span>(<span class="pl-s"><span class="pl-pds">&quot;</span>/Dept<span class="pl-pds">&quot;</span></span>)
<span class="pl-k">public</span> <span class="pl-k">class</span> <span class="pl-en">DeptAction</span> <span class="pl-k">extends</span> <span class="pl-e">BaseAction</span> {

  <span class="pl-c">/**</span>
<span class="pl-c">   * </span>
<span class="pl-c">   */</span>
  <span class="pl-k">private</span> <span class="pl-k">static</span> <span class="pl-k">final</span> <span class="pl-k">long</span> serialVersionUID <span class="pl-k">=</span> <span class="pl-c1">1L</span>;

  <span class="pl-c">// variable name equals @Service(&quot;deptService&quot;), need setter method</span>
  <span class="pl-k">private</span> <span class="pl-smi">DeptService</span> deptService;

  <span class="pl-k">private</span> <span class="pl-smi">Dept</span> dept;
  <span class="pl-k">private</span> <span class="pl-smi">DeptCriteria</span> deptCriteria;

  <span class="pl-c">/**</span>
<span class="pl-c">   * Goto page</span>
<span class="pl-c">   * @return</span>
<span class="pl-c">   */</span>
  <span class="pl-k">@Action</span>(<span class="pl-c1">value</span><span class="pl-k">=</span><span class="pl-s"><span class="pl-pds">&quot;</span>page<span class="pl-pds">&quot;</span></span>,<span class="pl-c1">results</span><span class="pl-k">=</span>{
          <span class="pl-k">@Result</span>(<span class="pl-c1">location</span><span class="pl-k">=</span><span class="pl-s"><span class="pl-pds">&quot;</span>/WEB-INF/content/main/hr/Dept.jsp<span class="pl-pds">&quot;</span></span>)
  })
  <span class="pl-k">public</span> <span class="pl-smi">String</span> <span class="pl-en">page</span>(){
      <span class="pl-k">return</span> <span class="pl-c1">SUCCESS</span>;
  }
  <span class="pl-c">/**</span>
<span class="pl-c">   * CRUD</span>
<span class="pl-c">   * @return</span>
<span class="pl-c">   */</span>
  <span class="pl-k">@Action</span>(<span class="pl-s"><span class="pl-pds">&quot;</span>save<span class="pl-pds">&quot;</span></span>)
  <span class="pl-k">public</span> <span class="pl-smi">String</span> <span class="pl-en">save</span>(){
      <span class="pl-c">// Save</span>
      <span class="pl-k">try</span> {
          deptService<span class="pl-k">.</span>save(dept);

          <span class="pl-c">// success message</span>
          msg <span class="pl-k">=</span> getText(<span class="pl-s"><span class="pl-pds">&quot;</span>msg.saveSuccess<span class="pl-pds">&quot;</span></span>);

          <span class="pl-c">// if need update page data, goto last page</span>
<span class="pl-c">//         super.page = deptService.findMaxPage(rows);</span>
      } <span class="pl-k">catch</span> (<span class="pl-smi">Exception</span> e) {
          e<span class="pl-k">.</span>printStackTrace();
          msg <span class="pl-k">=</span> getText(<span class="pl-s"><span class="pl-pds">&quot;</span>msg.saveFail<span class="pl-pds">&quot;</span></span>);
          statusCode<span class="pl-k">=</span><span class="pl-smi">StatusCode</span><span class="pl-c1"><span class="pl-k">.</span>ERROR</span>; <span class="pl-c">//默认为OK</span>
      }

      <span class="pl-c">/*</span>
<span class="pl-c">       * Ajax response info</span>
<span class="pl-c">       * {</span>
<span class="pl-c">       * statusCode: status code, </span>
<span class="pl-c">       * msg: message,</span>
<span class="pl-c">       * callback: callback function,</span>
<span class="pl-c">       * locationUrl: go to location</span>
<span class="pl-c">       * }</span>
<span class="pl-c">       */</span>
      <span class="pl-c">// JSON out, include Message</span>
  <span class="pl-c">//  super.setJsonMsgMap();</span>
      <span class="pl-c">// update datagrid info</span>
      <span class="pl-v">super</span><span class="pl-k">.</span>setJsonMsgMap(<span class="pl-s"><span class="pl-pds">&quot;</span>rowData<span class="pl-pds">&quot;</span></span>, dept);

      <span class="pl-c">// return JSON data</span>
      <span class="pl-k">return</span> <span class="pl-c1">JSON</span>;
  }

  <span class="pl-c">/**</span>
<span class="pl-c">   * Pagination</span>
<span class="pl-c">   * @return</span>
<span class="pl-c">   */</span>
  <span class="pl-k">@SuppressWarnings</span>(<span class="pl-s"><span class="pl-pds">&quot;</span>rawtypes<span class="pl-pds">&quot;</span></span>)
  <span class="pl-k">@Action</span>(<span class="pl-s"><span class="pl-pds">&quot;</span>list<span class="pl-pds">&quot;</span></span>)
  <span class="pl-k">public</span> <span class="pl-smi">String</span> <span class="pl-en">list</span>(){
      <span class="pl-smi">PageBean</span> pb <span class="pl-k">=</span> <span class="pl-v">super</span><span class="pl-k">.</span>getPageBean(); <span class="pl-c">// get PageBean</span>
      deptService<span class="pl-k">.</span>findByPage(pb,deptCriteria);
      <span class="pl-v">super</span><span class="pl-k">.</span>setJsonPaginationMap(pb);
      <span class="pl-k">return</span> <span class="pl-c1">JSON</span>;
  }

  <span class="pl-k">@Action</span>(<span class="pl-s"><span class="pl-pds">&quot;</span>delete<span class="pl-pds">&quot;</span></span>)
  <span class="pl-k">public</span> <span class="pl-smi">String</span> <span class="pl-en">delete</span>(){
      <span class="pl-k">try</span> {
          deptService<span class="pl-k">.</span>delete(dept<span class="pl-k">.</span>getDeptno());
      } <span class="pl-k">catch</span> (<span class="pl-smi">Exception</span> e) {
          e<span class="pl-k">.</span>printStackTrace();
          statusCode<span class="pl-k">=</span><span class="pl-smi">StatusCode</span><span class="pl-c1"><span class="pl-k">.</span>ERROR</span>;
      }
      <span class="pl-v">super</span><span class="pl-k">.</span>setJsonMsgMap();
      <span class="pl-k">return</span> <span class="pl-c1">JSON</span>;
  }
  <span class="pl-k">@Action</span>(<span class="pl-s"><span class="pl-pds">&quot;</span>update<span class="pl-pds">&quot;</span></span>)
  <span class="pl-k">public</span> <span class="pl-smi">String</span> <span class="pl-en">update</span>(){
      <span class="pl-k">try</span> {
          deptService<span class="pl-k">.</span>update(dept);
          msg<span class="pl-k">=</span>getText(<span class="pl-s"><span class="pl-pds">&quot;</span>msg.updateSuccess<span class="pl-pds">&quot;</span></span>);
      } <span class="pl-k">catch</span> (<span class="pl-smi">Exception</span> e) {
          e<span class="pl-k">.</span>printStackTrace();
          msg<span class="pl-k">=</span>getText(<span class="pl-s"><span class="pl-pds">&quot;</span>msg.updateFail<span class="pl-pds">&quot;</span></span>);
          statusCode<span class="pl-k">=</span><span class="pl-smi">StatusCode</span><span class="pl-c1"><span class="pl-k">.</span>ERROR</span>;
      }
      setJsonMsgMap();
      <span class="pl-k">return</span> <span class="pl-c1">JSON</span>;
  }

  <span class="pl-k">public</span> <span class="pl-smi">Dept</span> <span class="pl-en">getDept</span>() {
      <span class="pl-k">return</span> dept;
  }

  <span class="pl-k">public</span> <span class="pl-k">void</span> <span class="pl-en">setDept</span>(<span class="pl-smi">Dept</span> <span class="pl-v">dept</span>) {
      <span class="pl-v">this</span><span class="pl-k">.</span>dept <span class="pl-k">=</span> dept;
  }

  <span class="pl-k">public</span> <span class="pl-k">void</span> <span class="pl-en">setDeptService</span>(<span class="pl-smi">DeptService</span> <span class="pl-v">deptService</span>) {
      <span class="pl-v">this</span><span class="pl-k">.</span>deptService <span class="pl-k">=</span> deptService;
  }

  <span class="pl-k">public</span> <span class="pl-smi">DeptCriteria</span> <span class="pl-en">getDeptCriteria</span>() {
      <span class="pl-k">return</span> deptCriteria;
  }

  <span class="pl-k">public</span> <span class="pl-k">void</span> <span class="pl-en">setDeptCriteria</span>(<span class="pl-smi">DeptCriteria</span> <span class="pl-v">deptCriteria</span>) {
      <span class="pl-v">this</span><span class="pl-k">.</span>deptCriteria <span class="pl-k">=</span> deptCriteria;
  }
}</pre>
  </div> </li> 
 <li> <p><strong>Page</strong></p> 
  <ul> 
   <li> <p>Create folder：</p> 
    <ul> 
     <li><p><code>webapp/WEB-INF/content/main/yourmodule</code>（EasyUI page）</p></li> 
     <li><p><code>webapp/WEB-INF/content/dialog/yourmodule</code>(EasyUI Dialog page)</p></li> 
    </ul> </li> 
   <li> <p>Develop Page</p> 
    <ul> 
     <li>EasyEE use <code>EasyUI Tabs</code> of <code>href</code> include page,. </li> 
    </ul> 
    <blockquote> 
     <p>EasyUI Two Dynamic Tabs difference between dynamic loading:</p> 
     <p><strong>-Use content (iframe frame) the introduction page:</strong> content : ''; Exist as a separate window, the page content independent, non-interfering with the current page Need to introduce independent JS and CSS resources needed Pop-up content is within the window</p> 
     <p><strong>-Use href methods:</strong> href : url, A piece of content is loaded, the introduction of the contents of the current page and merge Need to introduce JS and CSS resource page has introduced Reference page can not have a body, or the contents of the internal loads of grammar JS file execution Html rendering prompt resolution displays To prevent inter-page DOM element, naming conflicts of JS (DOM unique name should be the same prefix, JS using namespaces)</p> 
    </blockquote> <p>-To prevent unique prefix naming conflicts between pages DOM elements, you should use unified DOM element for each page</p> 
    <ul> 
     <li>In order to prevent inter-page JavaScript variable naming conflicts should be defined only operating namespace for each page, all registration functions into the namespace</li> 
     <li>Recommended default development is structured as follows:</li> 
    </ul> 
    <div class="highlight highlight-text-html-jsp">
     <pre>  <span class="pl-c">&lt;%-- 1. Page Datagrid initialization related JS --%&gt;</span>

<span class="pl-s1">  &lt;<span class="pl-ent">script</span> <span class="pl-e">type</span>=<span class="pl-s"><span class="pl-pds">&quot;</span>text/javascript<span class="pl-pds">&quot;</span></span>&gt;</span>
<span class="pl-s1">  <span class="pl-c">// To avoid naming conflicts, define a unique operating namespace for each page</span></span>
<span class="pl-s1">  <span class="pl-c">// All functions registered into the namespace</span></span>
<span class="pl-s1">  <span class="pl-k">var</span> sysRole <span class="pl-k">=</span> {};</span>
<span class="pl-s1">  <span class="pl-en">$</span>(<span class="pl-k">function</span>() {</span>
<span class="pl-s1">      <span class="pl-c">/*</span></span>
<span class="pl-s1"><span class="pl-c"> * datagrid init</span></span>
<span class="pl-s1"><span class="pl-c"> */</span></span>
<span class="pl-s1">      <span class="pl-c">// ...</span></span>
<span class="pl-s1"></span>
<span class="pl-s1">      <span class="pl-c">/*</span></span>
<span class="pl-s1"><span class="pl-c"> * datagrid CRUD</span></span>
<span class="pl-s1"><span class="pl-c"> */</span></span>
<span class="pl-s1"></span>
<span class="pl-s1">      <span class="pl-c">/*</span></span>
<span class="pl-s1"><span class="pl-c"> * datagird search</span></span>
<span class="pl-s1"><span class="pl-c"> */</span></span>
<span class="pl-s1"></span>
<span class="pl-s1">  });</span>
<span class="pl-s1">  &lt;/<span class="pl-ent">script</span>&gt;</span>

  <span class="pl-c">&lt;%-- 2. content, don't need Body --%&gt;</span>
  <span class="pl-c">&lt;!--  ... --&gt;</span>

  <span class="pl-c">&lt;%-- grid contextmenu --%&gt;</span>
  <span class="pl-c">&lt;!--  ... --&gt;</span>

  <span class="pl-c">&lt;%-- 3. Dialog Page--%&gt;</span>
  <span class="pl-c">&lt;!--  ... --&gt;</span></pre>
    </div> </li> 
  </ul> </li> 
 <li> <p><strong>And configure access permissions</strong></p> 
  <ol> 
   <li><p>User Admin to Add <code>Menu Permission</code>(<code>/Dept/page.action</code>, click on the menu to access the action requested JSP views)</p></li> 
   <li><p>User Admin to Add <code>Operation Permission</code>(CRUD Permission, Show Controller Permission)</p></li> 
   <li><p>Assign <code>permissions and menu</code> operations for user</p></li> 
  </ol> </li> 
</ol> 
<h2> <a id="other-configuration-instructions" class="anchor" href="#other-configuration-instructions" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Other configuration instructions</h2> 
<h3> <a id="1-easyssh-ajax-response" class="anchor" href="#1-easyssh-ajax-response" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>1. EasySSH Ajax Response</h3> 
<ul> 
 <li> <p>EasySSH Ajax Response JSON:</p> 
  <div class="highlight highlight-source-json">
   <pre>{
  <span class="pl-ii">statusCode</span>: <span class="pl-ii">status</span> <span class="pl-ii">code</span>,  
  <span class="pl-ii">msg</span>: <span class="pl-ii">message</span>,
  <span class="pl-ii">callback</span>: <span class="pl-ii">callback</span> <span class="pl-ii">function</span>,
  <span class="pl-ii">locationUrl</span>: <span class="pl-ii">goto</span> <span class="pl-ii">location</span>,
  <span class="pl-ii">//...</span> <span class="pl-ii">other</span> <span class="pl-ii">data</span>
}</pre>
  </div> </li> 
 <li> <p>BaseAction out JSON method：</p> 
  <div class="highlight highlight-source-java">
   <pre><span class="pl-c">// you can define JSON root data </span>
setJsonRoot(<span class="pl-smi">Object</span>);
<span class="pl-c">// JSON include your Object</span>
setJsonMap(<span class="pl-smi">Object</span><span class="pl-k">.</span><span class="pl-c1">..</span>)
<span class="pl-c">// JSON include your Object and EasySSH Ajax response</span>
setJsonMsgMap(<span class="pl-smi">Object</span><span class="pl-k">.</span><span class="pl-c1">..</span>)
<span class="pl-c">// JSON include your Object, Pagination data and EasySSH Ajax response</span>
setJsonPaginationMap(<span class="pl-smi">PageBean</span>, <span class="pl-smi">Object</span><span class="pl-k">.</span><span class="pl-c1">..</span>)</pre>
  </div> </li> 
</ul> 
<h3> <a id="2-baseaction" class="anchor" href="#2-baseaction" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>2. BaseAction</h3> 
<ul> 
 <li>Servlet API(request, application )</li> 
 <li>JSON result constant： <code>final String JSON = &quot;json&quot;;</code> </li> 
 <li>JSON parameter(pagination, Ajax response)</li> 
 <li>JSON response method(<code>setJsonRoot</code>, <code>setJsonMap</code>, <code>setJsonMsgMap</code>, <code>setJsonPaginationMap</code>)</li> 
 <li>reloadPermissions(): refreshing the user's current permission after to modify permissions</li> 
 <li>utils</li> 
</ul> 
<h3> <a id="3--easycommondao" class="anchor" href="#3--easycommondao" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>3. EasyCommonDAO</h3> 
<p><a href="https://github.com/ushelp/EasyCommonDAO" title="EasyCommonDAO">EasyCommonDAO</a> provides a common persistence layer operation class, encapsulates a variety of daily operation methods, including pageBean and EasyCriteria-based paging and query condition processing components.</p> 
<h3> <a id="pagebean-pagination" class="anchor" href="#pagebean-pagination" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>PageBean pagination</h3> 
<ul> 
 <li> <p>Example</p> 
  <div class="highlight highlight-source-java">
   <pre><span class="pl-smi">PageBean</span> pb <span class="pl-k">=</span> <span class="pl-k">new</span> <span class="pl-smi">PageBean</span>();

<span class="pl-c">// FROM Clause; optional</span>
<span class="pl-c">// **If use EclipseLink is required!**</span>
pb<span class="pl-k">.</span>setSelect(<span class="pl-s"><span class="pl-pds">&quot;</span> select new com.company.ssh.entity.Account(ac.accountid, ac.qxname) <span class="pl-pds">&quot;</span></span>);
<span class="pl-c">// FROM Clause Entity Name; rquired</span>
pb<span class="pl-k">.</span>setEntityName(<span class="pl-s"><span class="pl-pds">&quot;</span>Account ac<span class="pl-pds">&quot;</span></span>); 
<span class="pl-c">// Page Number; optional; default is 1</span>
pb<span class="pl-k">.</span>setPageNo(<span class="pl-c1">1</span>); 
<span class="pl-c">// Rows per page; optional; default is 10</span>
pb<span class="pl-k">.</span>setRowsPerPage(<span class="pl-c1">4</span>);
<span class="pl-c">// WHERE Clause; optional; default is ''</span>
pb<span class="pl-k">.</span>setCondition(<span class="pl-s"><span class="pl-pds">&quot;</span> and ac.accountid&gt;2<span class="pl-pds">&quot;</span></span>);
<span class="pl-c">// Append where clause condition; optional; default is ''</span>
<span class="pl-c">// pb.addCondition(&quot; and name='A'&quot;);</span>
<span class="pl-c">// SortName; optional; default is ''</span>
pb<span class="pl-k">.</span>setSort(<span class="pl-s"><span class="pl-pds">&quot;</span>ac.accountid<span class="pl-pds">&quot;</span></span>);
<span class="pl-c">// SortOrder; optional; default is 'asc'</span>
pb<span class="pl-k">.</span>setSortOrder(<span class="pl-s"><span class="pl-pds">&quot;</span>desc<span class="pl-pds">&quot;</span></span>);
<span class="pl-c">// Other sorting methods; optional; default is ''</span>
pb<span class="pl-k">.</span>setLastSort(<span class="pl-s"><span class="pl-pds">&quot;</span>,time desc<span class="pl-pds">&quot;</span></span>);

<span class="pl-c">// Execute pagination quries</span>
commonDAO<span class="pl-k">.</span>findByPage(pb); 

<span class="pl-c">// Pagination data</span>
<span class="pl-smi">System</span><span class="pl-k">.</span>out<span class="pl-k">.</span>println(pb<span class="pl-k">.</span>getData());
<span class="pl-smi">System</span><span class="pl-k">.</span>out<span class="pl-k">.</span>println(pb<span class="pl-k">.</span>getPageNo());
<span class="pl-smi">System</span><span class="pl-k">.</span>out<span class="pl-k">.</span>println(pb<span class="pl-k">.</span>getRowsPerPage());
<span class="pl-smi">System</span><span class="pl-k">.</span>out<span class="pl-k">.</span>println(pb<span class="pl-k">.</span>getRowsCount());
<span class="pl-smi">System</span><span class="pl-k">.</span>out<span class="pl-k">.</span>println(pb<span class="pl-k">.</span>getPageTotal());</pre>
  </div> </li> 
 <li> <p>Example2</p> 
  <div class="highlight highlight-source-java">
   <pre><span class="pl-c">// Immediate use this query</span>
<span class="pl-c">// data sql</span>
pb<span class="pl-k">.</span>setQuery(<span class="pl-s"><span class="pl-pds">&quot;</span>select ac from Account ac where ac.accountid&gt;=10 and ac.accountid&lt;1000<span class="pl-pds">&quot;</span></span>);
<span class="pl-c">// total sql</span>
pb<span class="pl-k">.</span>setCountSQL(<span class="pl-s"><span class="pl-pds">&quot;</span>select count(1) from Account ac where ac.accountid&gt;=10 and ac.accountid&lt;1000<span class="pl-pds">&quot;</span></span>); 
<span class="pl-c">// Page Number; optional; default is 1</span>
pb<span class="pl-k">.</span>setPageNo(<span class="pl-c1">1</span>); 
<span class="pl-c">// Rows per page; optional; default is 10</span>
pb<span class="pl-k">.</span>setRowsPerPage(<span class="pl-c1">4</span>);

<span class="pl-c">// Execute pagination quries</span>
commonDAO<span class="pl-k">.</span>findByPage(pb); 

<span class="pl-c">// Pagination data...</span></pre>
  </div> </li> 
</ul> 
<h4> <a id="easycriteria-criteria-queries" class="anchor" href="#easycriteria-criteria-queries" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>EasyCriteria criteria queries</h4> 
<ol> 
 <li><p>New your EasyCriteria class, must extends EasyCriteria implements Serializable</p></li> 
 <li><p>Write your condition by getCondition()</p></li> 
 <li><p>Find by EasyCriteria</p></li> 
</ol> 
<ul> 
 <li> <p>Example</p> 
  <div class="highlight highlight-source-java">
   <pre><span class="pl-k">public</span> <span class="pl-k">class</span> <span class="pl-en">SysUserCriteria</span> <span class="pl-k">extends</span> <span class="pl-e">EasyCriteria</span> <span class="pl-k">implements</span> <span class="pl-e">java.io<span class="pl-k">.</span>Serializable</span> {
   <span class="pl-c">// 1. Criteria field</span>
   <span class="pl-k">private</span> <span class="pl-smi">String</span> name;
   <span class="pl-k">private</span> <span class="pl-smi">String</span> realName;
   <span class="pl-k">private</span> <span class="pl-smi">Integer</span> status; <span class="pl-c">// 0 is ON; 1 is OFF; 2 is REMOVED</span>

   <span class="pl-c">// 2. Constructor</span>
   <span class="pl-k">public</span> <span class="pl-en">SysUserCriteria</span>() {
   }

   <span class="pl-k">public</span> <span class="pl-en">SysUserCriteria</span>(<span class="pl-smi">String</span> <span class="pl-v">name</span>, <span class="pl-smi">String</span> <span class="pl-v">realName</span>, <span class="pl-smi">Integer</span> <span class="pl-v">status</span>) {
       <span class="pl-v">super</span>();
       <span class="pl-v">this</span><span class="pl-k">.</span>name <span class="pl-k">=</span> name;
       <span class="pl-v">this</span><span class="pl-k">.</span>realName <span class="pl-k">=</span> realName;
       <span class="pl-v">this</span><span class="pl-k">.</span>status <span class="pl-k">=</span> status;
   }

   <span class="pl-c">// 3. Condition genertator abstract method implements</span>
   <span class="pl-k">public</span> <span class="pl-smi">String</span> <span class="pl-en">getCondition</span>() {
       values<span class="pl-k">.</span>clear(); <span class="pl-c">// **Must clear old values**</span>

       <span class="pl-smi">StringBuffer</span> condition <span class="pl-k">=</span> <span class="pl-k">new</span> <span class="pl-smi">StringBuffer</span>();
       <span class="pl-k">if</span> (<span class="pl-smi">StringUtils</span><span class="pl-k">.</span>isNotNullAndEmpty(<span class="pl-v">this</span><span class="pl-k">.</span>getName())) {
           condition<span class="pl-k">.</span>append(<span class="pl-s"><span class="pl-pds">&quot;</span> and name like ?<span class="pl-pds">&quot;</span></span>);
           values<span class="pl-k">.</span>add(<span class="pl-s"><span class="pl-pds">&quot;</span>%<span class="pl-pds">&quot;</span></span> <span class="pl-k">+</span> <span class="pl-v">this</span><span class="pl-k">.</span>getName() <span class="pl-k">+</span> <span class="pl-s"><span class="pl-pds">&quot;</span>%<span class="pl-pds">&quot;</span></span>);
       }
       <span class="pl-k">if</span> (<span class="pl-smi">StringUtils</span><span class="pl-k">.</span>isNotNullAndEmpty(<span class="pl-v">this</span><span class="pl-k">.</span>getRealName())) {
           condition<span class="pl-k">.</span>append(<span class="pl-s"><span class="pl-pds">&quot;</span> and realName like ?<span class="pl-pds">&quot;</span></span>);
           values<span class="pl-k">.</span>add(<span class="pl-s"><span class="pl-pds">&quot;</span>%<span class="pl-pds">&quot;</span></span> <span class="pl-k">+</span> <span class="pl-v">this</span><span class="pl-k">.</span>getRealName() <span class="pl-k">+</span> <span class="pl-s"><span class="pl-pds">&quot;</span>%<span class="pl-pds">&quot;</span></span>);
       }
       <span class="pl-k">if</span> (<span class="pl-smi">StringUtils</span><span class="pl-k">.</span>isNotNullAndEmpty(<span class="pl-v">this</span><span class="pl-k">.</span>getStatus())) {
           condition<span class="pl-k">.</span>append(<span class="pl-s"><span class="pl-pds">&quot;</span> and status=?<span class="pl-pds">&quot;</span></span>);
           values<span class="pl-k">.</span>add(<span class="pl-v">this</span><span class="pl-k">.</span>getStatus());
       }
       <span class="pl-k">return</span> condition<span class="pl-k">.</span>toString();
   }

   <span class="pl-c">// 4. Setters&amp;amp;Getters...</span>

}</pre>
  </div> </li> 
 <li> <p>Usage</p> 
  <div class="highlight highlight-source-java">
   <pre><span class="pl-smi">PageBean</span> pageBean <span class="pl-k">=</span> <span class="pl-k">new</span> <span class="pl-smi">PageBean</span>();
pageBean<span class="pl-k">.</span>setEntityName(<span class="pl-s"><span class="pl-pds">&quot;</span>SysUser users<span class="pl-pds">&quot;</span></span>);
pageBean<span class="pl-k">.</span>setSelect(<span class="pl-s"><span class="pl-pds">&quot;</span>select users<span class="pl-pds">&quot;</span></span>);

<span class="pl-c">// EasyCriteria</span>
<span class="pl-smi">SysUserCriteria</span> usersCriteria <span class="pl-k">=</span><span class="pl-k">new</span> <span class="pl-smi">SysUserCriteria</span>();
usersCriteria<span class="pl-k">.</span>setName(<span class="pl-s"><span class="pl-pds">&quot;</span>A<span class="pl-pds">&quot;</span></span>);
usersCriteria<span class="pl-k">.</span>setStatus(<span class="pl-c1">0</span>);

<span class="pl-c">// Find by EasyCriteria</span>
commonDAO<span class="pl-k">.</span>findByPage(pageBean, usersCriteria);</pre>
  </div> </li> 
</ul> 
<h3> <a id="5-rights-profile" class="anchor" href="#5-rights-profile" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>5. Rights Profile</h3> 
<ul> 
 <li> <p><strong>Access Configuration</strong></p> 
  <ol> 
   <li><p>Adding menu rights and operation permissions</p></li> 
   <li><p>The menu for the role permissions and rights are allocated</p></li> 
   <li><p>Assign roles to users</p></li> 
  </ol> </li> 
 <li> <p><strong>Show Controller(e.g. WEB-INF/content/jsp/module/dept.jsp)</strong></p> 
  <ol> 
   <li><p>Show Permissions Configuration Permissions action in operation</p></li> 
   <li> <p>Include <code>siro-tags</code> taglig, You will need to display the contents of the definition of control in <code>shiro:hasPermission</code> within,<code>name</code> specified must have permission to display the name of the action</p> 
    <div class="highlight highlight-text-html-jsp">
     <pre>&lt;%@ <span class="pl-k">taglib</span> <span class="pl-e">uri</span>=<span class="pl-s"><span class="pl-pds">&quot;</span>http://shiro.apache.org/tags<span class="pl-pds">&quot;</span></span> <span class="pl-e">prefix</span>=<span class="pl-s"><span class="pl-pds">&quot;</span>shiro<span class="pl-pds">&quot;</span></span>%&gt;

&lt;<span class="pl-ent">shiro:hasPermission</span> <span class="pl-e">name</span>=<span class="pl-s"><span class="pl-pds">&quot;</span>deptDeleteShow<span class="pl-pds">&quot;</span></span>&gt;
&lt;<span class="pl-ent">div</span> <span class="pl-e">onclick</span>=<span class="pl-s"><span class="pl-pds">&quot;</span>$('#deptDataGrid').edatagrid('destroyRow')<span class="pl-pds">&quot;</span></span> <span class="pl-e">data-options</span>=<span class="pl-s"><span class="pl-pds">&quot;</span>iconCls:'icon-remove'<span class="pl-pds">&quot;</span></span>&gt;Delete&lt;/<span class="pl-ent">div</span>&gt;
&lt;/<span class="pl-ent">shiro:hasPermission</span>&gt;</pre>
    </div> </li> 
   <li><p>Assign rights for users</p></li> 
  </ol> </li> 
</ul> 
<h3> <a id="6-add-ons" class="anchor" href="#6-add-ons" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>6. Add-ons:</h3> 
<ul> 
 <li> <p><strong>EasyShiro</strong> (<a href="http://easyproject.cn/easyshiro/en/index.jsp#readme" title="EasShiro API">API</a>)</p> <p>EasyShiro based Shiro is a security extension components. Database rights management and Web URL authorization RBAC (Role Based Access Control) Web-based permission model provides universal support. EasyShiro simplifies security integration, and verification code, auto login, login is locked, an error message management, interceptors, Ajax, etc. in response to a more powerful and comprehensive feature support, only a simple configuration can be.</p> </li> 
 <li> <p><strong>EasyFilter Jave Web Request paramtere filter</strong> (<a href="http://easyproject.cn/easyfilter/zh-cn/index.jsp#readme" title="EasyFilter API">API</a>)</p> <p>EasyFilter is a Jave Web content filtering request replacement of a component, supports the use of properties or xml configuration file to customize the filter configuration, the user can request the following information to filter replacement:</p> 
  <ol> 
   <li><p>Replace special characters (such as: &amp; lt ;, &amp; gt; special tags, scripts, etc.)</p></li> 
   <li><p>Illegal keyword substitution (such as: network situation does not allow China's special keywords)</p></li> 
   <li><p>SQL-injection filter (eg:%, *, or, delete, and so on SQL special keyword)</p></li> 
  </ol> <p><strong>In <code>easyFilter.xml</code> has predefined default alternative arrangement.</strong></p> </li> 
 <li> <p><strong>EasyCommons</strong> (<a href="http://easyproject.cn/easycommons/zh-cn/index.jsp#readme" title="EasyCommons API">API</a>)</p> 
  <ul> 
   <li> <p>EasyCommons-imageutils</p> <p>Provide a picture compression, picture address extraction, image watermarking tools. </p> </li> 
   <li> <p>EasyCommons-objectutils</p> <p>Provided instead of Java Properties object properties file operations component.</p> </li> 
   <li> <p>EasyCommons-propertiesutils</p> <p>Provided (<code>FieldExpression</code>) field expression object attribute extraction based on object attribute filter, waited in vain for the object attribute is set Obejct object manipulation components.</p> </li> 
  </ul> </li> 
</ul> 
<h3> <a id="7-easyuiex" class="anchor" href="#7-easyuiex" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>7. EasyUIEx</h3> 
<p><a href="easyuiex-api_zh_CN.html" target="_blank" title="EasyUIEx API">EasyUIEx API</a> use jQuery EasyUI framework for the development of extensible plug-ins, mainly for common functions EasyUI framework encapsulates and expansion EasyUI can greatly increase the ease of use, simplify operational complexity, and provide additional functionality.</p> 
<p>Use during project development jQuery EasyUI + EasyUIEx architecture can greatly simplify the complexity EasyUI framework uses, especially in the various aspects of CRUD data grid, he made a high degree of packaging.</p> 
<p>In the project, a priority search EasyUIEx API functions can be done to achieve a multiplier effect.</p> 
<h2> <a id="end" class="anchor" href="#end" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>End</h2></body> 
</html>
